//
//  ColorListView.swift
//  MyColorPicker
//
//  Created by 火星人 on 2018/10/6.
//  Copyright © 2018 火星人. All rights reserved.
//

import Cocoa

class ColorListView: NSView {

    var mouseDownHandle: ((_ event: NSEvent) -> Void)?
    
    override func awakeFromNib() {
        super.awakeFromNib()
        let ta = NSTrackingArea(rect: self.frame, options: [.mouseMoved, .activeAlways], owner: self, userInfo: nil)
        self.addTrackingArea(ta)
    }
    
    override func mouseDown(with event: NSEvent) {
        self.mouseDownHandle?(event)
    }
    
    
}
